import request from '@/config/axios'

export const getTableList = async (params) => {
  return await request.get({
    url: '/bidAnnouncement/getPage',
    params
  })
}

export const getDetailById = async (params) => {
  return await request.get({
    url: '/bidAnnouncement/getById',
    params
  })
}

export const deleteAnnounce = async (id: string) => {
  return await request.delete({
    url: `/bidAnnouncement/delete?id=${id}`
  })
}

export const createAnnounce = async (data) => {
  return await request.post({
    url: '/bidAnnouncement/create',
    data
  })
}

export const getNumCode = async (params) => {
  return await request.get({
    url: '/system/numRule/getNumCode',
    params
  })
}

export const invalid = async (data) => {
  return await request.put({
    url: '/bidAnnouncement/invalid',
    data
  })
}

export const getCustomList = async () => {
  return await request.get({
    url: '/customer/getList'
  })
}

export const getAllList = async () => {
  return await request.get({
    url: '/customer/getAllList'
  })
}

export const getAnnouncement = async (params) => {
  return await request.get({
    url: '/sectionMessage/getAnnouncement',
    params
  })
}

export const bidCoalManageList = async () => {
  return await request.get({
    url: '/bidCoalManage/getList'
  })
}
